package com.cf.game.message;

import com.cf.game.service.constants.EnumReturnCode;
import com.cf.serialize.Response;
import com.cf.serialize.SmallRoomResponse;

/**
 * game-server-BeanResponse
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/5/8 上午 11:05
 */
public class BeatResponse extends SmallRoomResponse {

    public static Integer type = EnumMessageType.BeatResponse.getType();

    private String statue;

    private Integer totalScore;

    private Integer beatScore = 0;

    private Boolean self = false;

    public BeatResponse() {
        super("", EnumReturnCode.SUCCESS.getCode());
    }

    @Override
    public Integer messageType() {
        return type;
    }


    public static BeatResponse build(String statue, Integer totalScore, Integer beatScore, Boolean self, Integer left, Integer total) {
        BeatResponse beatResponse = new BeatResponse();
        beatResponse.setBeatScore(beatScore);
        beatResponse.setStatue(statue);
        beatResponse.setTotalScore(totalScore);
        beatResponse.setSelf(self);
        beatResponse.setLeftTime(left);
        beatResponse.setGameTime(total);
        return beatResponse;
    }

    public String getStatue() {
        return statue;
    }

    public void setStatue(String statue) {
        this.statue = statue;
    }

    public Integer getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Integer totalScore) {
        this.totalScore = totalScore;
    }

    public Integer getBeatScore() {
        return beatScore;
    }

    public void setBeatScore(Integer beatScore) {
        this.beatScore = beatScore;
    }

    public Boolean getSelf() {
        return self;
    }

    public void setSelf(Boolean self) {
        this.self = self;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        BeatResponse.type = type;
    }
}
